package w2

object ArrTst {
  def main(args: Array[String]): Unit = {
    //数组
    val ar = new Array[Int](5)
    ar(0) = 100
    ar(1) = 33
    ar(4) = 102
    println(ar)
    println(ar.toBuffer)
    var a2 = Array(12, 3, 15, 7, 11, 55, 342)
   
    println(a2.toBuffer)

    println("a2的最大值：")
    println(a2.max)

    println(a2.sum)

    //a2.sortBy()
  }
}
